//
//  Line0TableViewCell.swift
//  AreaChainblock
//
//  Created by 赵佟越 on 2018/11/5.
//  Copyright © 2018年 zhaotongyue. All rights reserved.
//

import UIKit

class Line0TableViewCell: UITableViewCell {

    //重写cell init方法
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        
        self.contentView.addSubview(self.contentLable)
        
        contentLable.snp_makeConstraints { (make) -> Void in
            make.leading.equalTo(self.contentView).offset(10)
            make.trailing.equalTo(self.contentView).offset(-10)
            make.top.equalTo(self.contentView).offset(10)
        }
        //重点：给contentView布局，让它的底部跟contentLable的底部一致
        contentView.snp_makeConstraints { (make) -> Void in
            make.bottom.equalTo(self.contentLable.snp_bottom).offset(10)
            make.leading.equalTo(self)
            make.top.equalTo(self)
            make.trailing.equalTo(self)
            
        }
    }
    
    //懒加载label
    lazy var contentLable:UILabel = {()-> UILabel in
        
        let lable:UILabel = UILabel()
        lable.numberOfLines = 0
        lable.isUserInteractionEnabled = true
        
        return lable
    }()
}
